package org.shoukaiseki.supersaiyan.db.inittable.system;

import org.shoukaiseki.inittable.domain.TableColumnInfo;
import org.shoukaiseki.inittable.domain.TableIndexInfo;
import org.shoukaiseki.inittable.service.ITableBuildInfoService;
import org.shoukaiseki.kakaroto.annotation.TableBuild;

import java.util.List;

import static org.shoukaiseki.inittable.utils.SksColumnCamelCaseCommon.uniqueId;
import static org.shoukaiseki.inittable.utils.TableColumnInfoBuilder.column;
import static org.shoukaiseki.inittable.utils.TableIndexInfoBuilder.uniqueIndex;
import static org.shoukaiseki.inittable.utils.TableInfoUtils.tableColumns;
import static org.shoukaiseki.inittable.utils.TableInfoUtils.tableIndexs;


/**
 *
 **/
@TableBuild(name = "sys_role", comment = "角色信息表",version = 1)
public class SysRoleInitTable  implements ITableBuildInfoService {


    @Override
    public List<TableColumnInfo> tableColumnInfoList(){
        List<TableColumnInfo> table = tableColumns(

                uniqueId("role_id","角色ID"),
                column("	role_name           varchar(30)             not null comment '角色名称',"),
                column("	role_key            varchar(100)            not null comment '角色权限字符串',"),
                column("	role_sort           int                     not null comment '显示顺序',"),
                column("	data_scope         char        default '1' null comment '数据范围',")
                        .description("（1：全部数据权限 2：自定数据权限 3：本部门数据权限 4：本部门及以下数据权限）"),
                column("	bit_flag          tinyint(8)  default 0   not null comment '隐藏类型',")
                        .description("&1: 除管理员外不可见,&2: 不允许删除,&4: 不允许修改"),
                column("	menu_check_strictly tinyint(1)  default 1   null comment '菜单树选择项是否关联显示',"),
                column("	dept_check_strictly tinyint(1)  default 1   null comment '部门树选择项是否关联显示',"),
                column("	status              char                    not null comment '角色状态（0正常 1停用）',"),
                column("	del_flag            char        default '0' null comment '删除标志（0代表存在 2代表删除）',"),
                column("	create_by           varchar(64) default ''  null comment '创建者',"),
                column("	create_time         datetime                null comment '创建时间',"),
                column("	update_by           varchar(64) default ''  null comment '更新者',"),
                column("	update_time         datetime                null comment '更新时间',"),
                column("	remark              varchar(500)            null comment '备注'"),
                null
        );

        return table;
    }

}
